package com.jxau.mall.user.entity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.jxau.mall.common.util.EncryptHandler;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import org.springframework.stereotype.Component;

import java.io.Serializable;

@Getter
@Setter
//@Data  该注解能代替以上两个注解
@AllArgsConstructor //创建所有参数的构造方法
@NoArgsConstructor //创建无参的构造方法
@Component //在容器中实例化一个对象 相当于UserReceiveAddress userreceiveaddres  = new UserReceiveAddress();
@TableName(value = "user_receive_address",autoResultMap = true) //如果命名规范，则不需要写这句，命名规范为驼峰命名

public class UserReceiveAddress implements Serializable {

    private static final long serialVersionUID = 3L;

    private Long id;//编号

    private Long userId;//用户编号c=c

    private String name;//姓名

    private String phoneNumber;//电话号码

    private Integer defaultStatus;//状态

    private String postCode;//邮箱编码

    private String province;//省份

    private String city;//城市

    private String region;//地区

    @TableField(typeHandler = EncryptHandler.class)
    private String detailAddress;//详细地址
}
